package com.cazor.dgjq.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cazor.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.cazor.dgjq.mapper.DgjqDeviceSensorMapper;
import com.cazor.dgjq.domain.DgjqDeviceSensor;
import com.cazor.dgjq.service.IDgjqDeviceSensorService;

/**
 * 酒泉传感器设备Service业务层处理
 *
 * @author cazor
 * @date 2024-05-15
 */
@Service
public class DgjqDeviceSensorServiceImpl extends ServiceImpl<DgjqDeviceSensorMapper, DgjqDeviceSensor> implements IDgjqDeviceSensorService
{
    @Resource
    private DgjqDeviceSensorMapper dgjqDeviceSensorMapper;

    /**
     * 查询酒泉传感器设备
     *
     * @param id 酒泉传感器设备主键
     * @return 酒泉传感器设备
     */
    @Override
    public DgjqDeviceSensor selectDgjqDeviceSensorById(Long id)
    {
        return dgjqDeviceSensorMapper.selectDgjqDeviceSensorById(id);
    }

    /**
     * 查询酒泉传感器设备列表
     *
     * @param dgjqDeviceSensor 酒泉传感器设备
     * @return 酒泉传感器设备
     */
    @Override
    public List<DgjqDeviceSensor> selectDgjqDeviceSensorList(DgjqDeviceSensor dgjqDeviceSensor)
    {
        return dgjqDeviceSensorMapper.selectDgjqDeviceSensorList(dgjqDeviceSensor);
    }

    /**
     * 新增酒泉传感器设备
     *
     * @param dgjqDeviceSensor 酒泉传感器设备
     * @return 结果
     */
    @Override
    public int insertDgjqDeviceSensor(DgjqDeviceSensor dgjqDeviceSensor)
    {
        dgjqDeviceSensor.setCreateTime(DateUtils.getNowDate());
        return dgjqDeviceSensorMapper.insertDgjqDeviceSensor(dgjqDeviceSensor);
    }

    /**
     * 修改酒泉传感器设备
     *
     * @param dgjqDeviceSensor 酒泉传感器设备
     * @return 结果
     */
    @Override
    public int updateDgjqDeviceSensor(DgjqDeviceSensor dgjqDeviceSensor)
    {
        dgjqDeviceSensor.setUpdateTime(DateUtils.getNowDate());
        return dgjqDeviceSensorMapper.updateDgjqDeviceSensor(dgjqDeviceSensor);
    }

    /**
     * 批量删除酒泉传感器设备
     *
     * @param ids 需要删除的酒泉传感器设备主键
     * @return 结果
     */
    @Override
    public int deleteDgjqDeviceSensorByIds(Long[] ids)
    {
        return dgjqDeviceSensorMapper.deleteDgjqDeviceSensorByIds(ids);
    }

    /**
     * 删除酒泉传感器设备信息
     *
     * @param id 酒泉传感器设备主键
     * @return 结果
     */
    @Override
    public int deleteDgjqDeviceSensorById(Long id)
    {
        return dgjqDeviceSensorMapper.deleteDgjqDeviceSensorById(id);
    }
}
